/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * ClassName: DiscountDetail <br/>
 * Function: 折扣明细 <br/>
 * date: 2018-11-29 10:02:41 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="discount_details")
public class DiscountDetail extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 折扣方案id 
    @Column(name="discount_id")
	private Long discountId = null;

	// 类别id 
    @Column(name="category_id")
	private Long categoryId = null;

	// 菜品id 
    @Column(name="dishes_id")
	private Long dishesId = null;

	// 折扣率 
    @Column(name="rate",scale=2)
	private Double rate = null;

	// 特价折扣率
    @Column(name="special_rate",scale=2)
	private Double specialRate = null;


    @Tolerate
	public DiscountDetail() {
		
	}
    @Tolerate
	public DiscountDetail(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取折扣方案id
	 */
	public Long getDiscountId() {
		return this.discountId;
	}

    /**
     * 设置折扣方案id
     */
	public DiscountDetail setDiscountId(Long discountId) {
		this.discountId = discountId;
		return this;
	}

	/**
	 * 获取类别id
	 */
	public Long getCategoryId() {
		return this.categoryId;
	}

    /**
     * 设置类别id
     */
	public DiscountDetail setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
		return this;
	}

	/**
	 * 获取菜品id
	 */
	public Long getDishesId() {
		return this.dishesId;
	}

    /**
     * 设置菜品id
     */
	public DiscountDetail setDishesId(Long dishesId) {
		this.dishesId = dishesId;
		return this;
	}

	/**
	 * 获取折扣率
	 */
	public Double getRate() {
		return this.rate;
	}

    /**
     * 设置折扣率
     */
	public DiscountDetail setRate(Double rate) {
		this.rate = rate;
		return this;
	}

	public Double getSpecialRate() {
		return specialRate;
	}

	public void setSpecialRate(Double specialRate) {
		this.specialRate = specialRate;
	}
}
